<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>netLink C++ 11: MsgPack::Deserializer Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">netLink C++ 11
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>MsgPack</b></li><li class="navelem"><a class="el" href="class_msg_pack_1_1_deserializer.html">Deserializer</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_msg_pack_1_1_deserializer-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">MsgPack::Deserializer Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Used to deserialize elements from a std::streambuf.  
 <a href="class_msg_pack_1_1_deserializer.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_stream_manager_8h_source.html">StreamManager.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for MsgPack::Deserializer:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_msg_pack_1_1_deserializer.png" usemap="#MsgPack::Deserializer_map" alt=""/>
  <map id="MsgPack::Deserializer_map" name="MsgPack::Deserializer_map">
<area href="class_msg_pack_1_1_stream_manager.html" title="Abstract parent class of Serializer and Deserializer." alt="MsgPack::StreamManager" shape="rect" coords="0,0,160,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab4075ab25790c7f8f56b05e46d083ae8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_msg_pack_1_1_deserializer.html#ab4075ab25790c7f8f56b05e46d083ae8">Deserializer</a> (std::streambuf *_streamBuffer)</td></tr>
<tr class="separator:ab4075ab25790c7f8f56b05e46d083ae8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8204968ef56482f602d9da6fdff7491d"><td class="memItemLeft" align="right" valign="top">std::streamsize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_msg_pack_1_1_deserializer.html#a8204968ef56482f602d9da6fdff7491d">deserialize</a> (PushCallback pushElement, bool hierarchy=true, std::streamsize bytes=0)</td></tr>
<tr class="separator:a8204968ef56482f602d9da6fdff7491d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a906dd9012a6b4702086ad96dcc0a6ab3"><td class="memItemLeft" align="right" valign="top">std::streamsize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_msg_pack_1_1_deserializer.html#a906dd9012a6b4702086ad96dcc0a6ab3">deserialize</a> (std::unique_ptr&lt; <a class="el" href="class_msg_pack_1_1_element.html">Element</a> &gt; &amp;element, bool hierarchy=true, std::streamsize bytes=0)</td></tr>
<tr class="separator:a906dd9012a6b4702086ad96dcc0a6ab3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abefa9ae9d451971a67d3ed3a6a4fa5f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_msg_pack_1_1_deserializer.html">Deserializer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_msg_pack_1_1_deserializer.html#abefa9ae9d451971a67d3ed3a6a4fa5f0">operator&gt;&gt;</a> (std::unique_ptr&lt; <a class="el" href="class_msg_pack_1_1_element.html">Element</a> &gt; &amp;element)</td></tr>
<tr class="separator:abefa9ae9d451971a67d3ed3a6a4fa5f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_types_class_msg_pack_1_1_stream_manager"><td colspan="2" onclick="javascript:toggleInherit('pro_types_class_msg_pack_1_1_stream_manager')"><img src="closed.png" alt="-"/>&#160;Protected Types inherited from <a class="el" href="class_msg_pack_1_1_stream_manager.html">MsgPack::StreamManager</a></td></tr>
<tr class="memitem:a78d6144c89619f8811723a38378d15a2 inherit pro_types_class_msg_pack_1_1_stream_manager"><td class="memItemLeft" align="right" valign="top">
typedef std::pair&lt; <a class="el" href="class_msg_pack_1_1_element.html">Element</a> *, int64_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>StackElement</b></td></tr>
<tr class="memdesc:a78d6144c89619f8811723a38378d15a2 inherit pro_types_class_msg_pack_1_1_stream_manager"><td class="mdescLeft">&#160;</td><td class="mdescRight">To store the (de)serializer position. <br /></td></tr>
<tr class="separator:a78d6144c89619f8811723a38378d15a2 inherit pro_types_class_msg_pack_1_1_stream_manager"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_class_msg_pack_1_1_stream_manager"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_class_msg_pack_1_1_stream_manager')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="class_msg_pack_1_1_stream_manager.html">MsgPack::StreamManager</a></td></tr>
<tr class="memitem:ad9f5b6069b19cdcf02d1faa69a10db71 inherit pro_methods_class_msg_pack_1_1_stream_manager"><td class="memItemLeft" align="right" valign="top">
&#160;</td><td class="memItemRight" valign="bottom"><b>StreamManager</b> (std::streambuf *_streamBuffer)</td></tr>
<tr class="memdesc:ad9f5b6069b19cdcf02d1faa69a10db71 inherit pro_methods_class_msg_pack_1_1_stream_manager"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initalize from stream buffer. <br /></td></tr>
<tr class="separator:ad9f5b6069b19cdcf02d1faa69a10db71 inherit pro_methods_class_msg_pack_1_1_stream_manager"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_class_msg_pack_1_1_stream_manager"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_class_msg_pack_1_1_stream_manager')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="class_msg_pack_1_1_stream_manager.html">MsgPack::StreamManager</a></td></tr>
<tr class="memitem:a7ba5513c15dbc3b16b7c76980b218f1f inherit pro_attribs_class_msg_pack_1_1_stream_manager"><td class="memItemLeft" align="right" valign="top">
std::unique_ptr&lt; <a class="el" href="class_msg_pack_1_1_element.html">Element</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>rootElement</b></td></tr>
<tr class="memdesc:a7ba5513c15dbc3b16b7c76980b218f1f inherit pro_attribs_class_msg_pack_1_1_stream_manager"><td class="mdescLeft">&#160;</td><td class="mdescRight">The element at the root of the hierarchy. <br /></td></tr>
<tr class="separator:a7ba5513c15dbc3b16b7c76980b218f1f inherit pro_attribs_class_msg_pack_1_1_stream_manager"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ef225894886b39d839ef0fce291a3e7 inherit pro_attribs_class_msg_pack_1_1_stream_manager"><td class="memItemLeft" align="right" valign="top">
std::vector&lt; <a class="el" href="class_msg_pack_1_1_stream_manager.html#a78d6144c89619f8811723a38378d15a2">StackElement</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>stack</b></td></tr>
<tr class="memdesc:a6ef225894886b39d839ef0fce291a3e7 inherit pro_attribs_class_msg_pack_1_1_stream_manager"><td class="mdescLeft">&#160;</td><td class="mdescRight">The element hierarchy stack. <br /></td></tr>
<tr class="separator:a6ef225894886b39d839ef0fce291a3e7 inherit pro_attribs_class_msg_pack_1_1_stream_manager"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a418889ec3fd3a35e9ffbebdc360be0d9 inherit pro_attribs_class_msg_pack_1_1_stream_manager"><td class="memItemLeft" align="right" valign="top">std::streambuf *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_msg_pack_1_1_stream_manager.html#a418889ec3fd3a35e9ffbebdc360be0d9">streamBuffer</a></td></tr>
<tr class="separator:a418889ec3fd3a35e9ffbebdc360be0d9 inherit pro_attribs_class_msg_pack_1_1_stream_manager"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Used to deserialize elements from a std::streambuf. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ab4075ab25790c7f8f56b05e46d083ae8" name="ab4075ab25790c7f8f56b05e46d083ae8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab4075ab25790c7f8f56b05e46d083ae8">&#9670;&#160;</a></span>Deserializer()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">MsgPack::Deserializer::Deserializer </td>
          <td>(</td>
          <td class="paramtype">std::streambuf *&#160;</td>
          <td class="paramname"><em>_streamBuffer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructs the <a class="el" href="class_msg_pack_1_1_deserializer.html" title="Used to deserialize elements from a std::streambuf.">Deserializer</a> </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">_streamBuffer</td><td>A std::streambuf to be used as target for write operations </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a8204968ef56482f602d9da6fdff7491d" name="a8204968ef56482f602d9da6fdff7491d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8204968ef56482f602d9da6fdff7491d">&#9670;&#160;</a></span>deserialize() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::streamsize MsgPack::Deserializer::deserialize </td>
          <td>(</td>
          <td class="paramtype">PushCallback&#160;</td>
          <td class="paramname"><em>pushElement</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>hierarchy</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::streamsize&#160;</td>
          <td class="paramname"><em>bytes</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Deserializes elements from the streamBuffer </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pushElement</td><td>Callback which will be called when the next element has been deserialized and can return true to stop the deserialization </td></tr>
    <tr><td class="paramname">hierarchy</td><td>If false arrays and maps will be deserialized as a flat stream of elements </td></tr>
    <tr><td class="paramname">bytes</td><td>Limit of bytes to read or 0 to read as much as possible </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a906dd9012a6b4702086ad96dcc0a6ab3" name="a906dd9012a6b4702086ad96dcc0a6ab3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a906dd9012a6b4702086ad96dcc0a6ab3">&#9670;&#160;</a></span>deserialize() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::streamsize MsgPack::Deserializer::deserialize </td>
          <td>(</td>
          <td class="paramtype">std::unique_ptr&lt; <a class="el" href="class_msg_pack_1_1_element.html">Element</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>element</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>hierarchy</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::streamsize&#160;</td>
          <td class="paramname"><em>bytes</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Deserializes one element from the streamBuffer </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">element</td><td>std::unique_ptr in which the element will be stored </td></tr>
    <tr><td class="paramname">hierarchy</td><td>If false arrays and maps will be deserialized as a flat stream of elements </td></tr>
    <tr><td class="paramname">bytes</td><td>Limit of bytes to read or 0 to read as much as possible </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="abefa9ae9d451971a67d3ed3a6a4fa5f0" name="abefa9ae9d451971a67d3ed3a6a4fa5f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abefa9ae9d451971a67d3ed3a6a4fa5f0">&#9670;&#160;</a></span>operator&gt;&gt;()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_msg_pack_1_1_deserializer.html">Deserializer</a> &amp; MsgPack::Deserializer::operator&gt;&gt; </td>
          <td>(</td>
          <td class="paramtype">std::unique_ptr&lt; <a class="el" href="class_msg_pack_1_1_element.html">Element</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>element</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Tries to deserialize one <a class="el" href="class_msg_pack_1_1_element.html" title="Abstract class to represent one element in a MsgPack stream.">MsgPack::Element</a> from the streamBuffer </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">element</td><td>std::unique_ptr in which the element will be stored </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/<a class="el" href="_stream_manager_8h_source.html">StreamManager.h</a></li>
<li>src/MsgPack.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
</small></address>
</body>
</html>
